from __future__ import print_function
from multiprocessing import Pool
import time

def f(name):
    #n = 1/0
    time.sleep(1)
    now = time.time()
    print('now is', now)
    return now

if __name__ == '__main__':
    pool = Pool(processes=4)
    results = []
    for _ in range(12):
        result = pool.apply_async(f, args=('bob',))
    print("for end.")
    pool.close()
    pool.join()
    print("pool close.")
